package com.garygyp.eduservice.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author GaryGyp
 * @date 2022/5/21 15:49
 * @description
 */
@Component
@FeignClient(value = "service-order", fallback = OrdersFileDegradeFeignClient.class)
public interface OrdersClient {

    // 3. 根据课程id和用户id查询订单表中的订单状态
    @GetMapping("/orderservice/order/isBuyCourse/{courseId}/{memberId}")
    public boolean isBuyCourse(@PathVariable("courseId") String courseId, @PathVariable("memberId") String memberId);

}
